function signalTx = WiSiL_Tx_precoder( modulatedSignalTx , transmitter )
%This functions performs the precoding for multiple antenna transmission
%according to 3GPP TS 36.211 V8.2.0. 
% This precoding is done in two steps, see 3GPP TS 36.211 V8.2.0 for more information:
%     1) Layer Mapper - modulatedSignalTx is mapped onto layers.
%     2) precoding - the layer mapper output is mapped on a single vector 
%           to be transmitted on each antenna.  
% Syntax:
% signalTx=precoder2( modulatedSignalTx , transmitter )
% 
% INPUT PARAMETERS: 
% modulatedSignalTx - Modulated Signal vector to be mapped onto resource
% for each antenna port.
% transmitter - structure containing all transmitter scheme parameters:
%   transmitter.txNum = number of transmitter antennas.
%   transmitter.scheme -  'none' (allowed only for single antenna
%   transmission), 'diversity', 'multiplexing'.
%   transmitter.layers - number of layers.
%
%OUTPUT PARAMETERS:
% signalTx - transmitted Signal. Each column represents a vector to be
% transmitted at one antenna.

% 11/30/2008 Rafhael Amorim

mappedSignal = WiSiL_Precoder_layerMapper( modulatedSignalTx , transmitter ); 

signalTx = WiSiL_Precoder_precoding( mappedSignal, transmitter); 
    
